<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>数据查询</title>
    
    <style type="text/css">
		.mytable {
			width: 700px;
			autoscroll: true;
			padding: 0;
			margin: 0;
		}
		
		.mytable caption {
			padding: 0 0 5px 0;
			width: 700px;	 
			font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
			text-align: right;
		}
		
		.mytable th {
			font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
			color: #4f6b72;
			border: 1px solid #C1DAD7;
			letter-spacing: 2px;
			text-transform: uppercase;
			text-align: left;
			padding: 6px 6px 6px 12px;
			background: #CAE8EA url(images/bg_header.jpg) no-repeat;
		}
		
		.mytable th.nobg {
			border-top: 0;
			border-left: 0;
			border-right: 1px solid #C1DAD7;
			background: none;
		}
		
		.mytable td {
			border: 1px solid #C1DAD7;
			background: #fff;
			padding: 6px 6px 6px 12px;
			color: #4f6b72;
		}
		
		
		.mytable td.alt {
			background: #F5FAFA;
			color: #797268;
		}
		
		.mytable th.spec {
			border-left: 1px solid #C1DAD7;
			border-top: 0;
			background: #fff url(images/bullet1.gif) no-repeat;
			font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		}
		
		.mytable th.specalt {
			border-left: 1px solid #C1DAD7;
			border-top: 0;
			background: #f5fafa url(images/bullet2.gif) no-repeat;
			font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
			color: #797268;
		}
	</style>
    
    <link href="../common/css/style1.css" rel="stylesheet" type="text/css" />
    <link href="../common/css/ui.jqgrid.css" rel="stylesheet" type="text/css" />
    <link href="../common/js/dp/css/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" src="../common/js/jquery-1.9.1.min.js"></script> 
    <script type="text/javascript" src="../common/js/jquery-ui.js"></script> 
    <script type="text/javascript" src="../common/js/common.js"></script>
    <script type="text/javascript" src="../common/js/jquery.jqGrid.min.js"></script>
    <script type="text/javascript" src="../common/js/grid.locale-cn.js"></script>
    <script type="text/javascript" src="../common/js/dp/js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="../common/js/dp/js/ui.datepicker-zh-cn.js"></script>
    <script type="text/javascript" src="../common/js/datetime.js"></script>
    
    <script type="text/javascript">
	    //var $j = jQuery.noConflict();//以$j来替代jQuery中的$
        function ShowMenu(id) {
            var className = document.getElementById('menu' + id).className;
            if(className.indexOf('curr')==-1)
                document.getElementById('menu' + id).className = 'mouseover';
            else
                document.getElementById('menu' + id).className = 'curr mouseover';
            document.getElementById('ul'+id).style.display = 'block';
        }
        function HideMenu(id) {
            var className = document.getElementById('menu' + id).className;
            if (className.indexOf('curr') == -1)
                document.getElementById('menu' + id).className = '';
            else
                document.getElementById('menu' + id).className = 'curr';
            document.getElementById('ul' + id).style.display = 'none';
        }
        var oldOld = null;
        function ShowMenuDd(obj) {
            if (oldOld == obj) return;
            if (oldOld != null) {
                oldOld.className = '';
            }
            obj.className = 'visible';
            oldOld = obj;
        }

        var speed3 = 10; //速度数值越大速度越慢
        var maxWidth = 0;
        window.onload = function () {
            maxWidth = document.getElementById("divScrollCommend").scrollWidth;
            document.getElementById("tdScroll2").innerHTML = document.getElementById("tdScroll1").innerHTML;
            var MyMar = setInterval(Marquee, speed3);
            document.getElementById("divScrollCommend").onmouseover = function () { clearInterval(MyMar); };
            document.getElementById("divScrollCommend").onmouseout = function () { MyMar = setInterval(Marquee, speed3); };
        };

        function Marquee() {
            var left = parseInt(document.getElementById("divScrollCommend").style.left);
            if (left + maxWidth == 0) {
                left = 0;
            }
            else {
                left--;
            }
            document.getElementById("divScrollCommend").style.left = left + 'px';
        }
        
        function query(){
        	var beginTime = $j("#begin_time").val();
			var endTime =  $j("#end_time").val();
			$("#beginTime").val(beginTime);
			$("#endTime").val(endTime);
			document.getElementById("myForm").submit();
        }
   	</script>
  </head>
  <body>
    <jsp:include page="../common/header.jsp"></jsp:include>
    <div class="Container">
    	<div class="inquiry_box">
            <table width="100%" cellspacing="0" cellpadding="0" border="0" class="h">
			    <tbody>
			    	<tr>
			            <td><h1>数据查询</h1></td>
			            <td></td>
			        </tr>
			    </tbody>
			</table>
        </div>
        <div class="show_select">
        	<table id="dataType" style="width: 100%; height: 30px; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td width="10%">
        					<strong>数据类型</strong>
						</td>
						<td width="30%">
							<select id="selection_dataType" style="width: 70%">
							  <option queryLevel="1" value="quantum" selected="selected">量子数据</option>
							  <option queryLevel="0" value="stores">店铺属性</option>
							  <option queryLevel="0" value="products">商品属性</option>
							  <option queryLevel="2" value="taskcost">销售任务/任务成本</option>
							  <option queryLevel="1" value="sales">入仓销售</option>
							  <option queryLevel="1" value="expressfees">运费</option>
							  <option queryLevel="0" value="reasons">退货原因</option>
							  <option queryLevel="0" value="warehouse">仓库辖区</option>
							  <option queryLevel="0" value="express">快递公司</option>
							  <option queryLevel="0" value="shop_properties">店铺属性参数</option>
							</select>
						</td>
						<td width="10%"></td>
						<td width="30%"></td>
                    	<td width="20%"></td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="searchCriteria" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
	                <tr id="search_timeType" style="display: none;">
	                    <td width="10%"><strong>统计时间</strong></td>
	                    <td colspan="2">
	                        <label><input type="radio" checked="checked" value="w" name="range" />周销售任务/任务成本</label>
	                        <label><input type="radio" value="m" name="range" />月销售任务/任务成本</label>
	                    </td>
	                    <td width="30%"></td>
	                    <td width="10%"></td>
	                </tr>
	                <tr id="search_baseCriteria" style="display: none">
	                    <td width="10%"><strong>开始日期</strong></td>
	                    <td width="30%"><input type="text" id="start_dt" value="" name="start_dt" class="fromDate" /></td>
	                    <td width="10%"><strong>结束日期</strong></td>
	                    <td width="30%"><input type="text" id="end_dt" value="" name="end_dt" class="toDate" /></td>
	                    <td width="20%"><input type="button" id='btn_search' class="buttonA" value="查询数据" /></td>
	                </tr>
					<tr id="search_message" style="display:none;">
						<td width="10%"></td>
						<td colspan="3" style="text-align: left;">
							(当选择周销售任务/任务成本时，日期请选择星期一)
						</td>
						<td width="20%"></td>				
					</tr>
            	</tbody>
        	</table>
        </div>
        <div id="result" style="height: 400px; overflow-y: scroll; border: 1px solid #FFFFF;">
        	<table id="t_quantum" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>店铺ID</td>
        				<td>店铺</td>
        				<td>时间</td>
        				<td>浏览量</td>
        				<td>访客数</td>
        				<td>人均成交件数</td>
        				<td>客单价</td>
        				<td>全店成交转化率</td>
        				<td>免费流量</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_stores" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>店铺ID</td>
        				<td>店铺名称</td>
        				<td>属性ID</td>
        				<td>店铺属性</td>
        				<td>修改时间</td>
        				<td>修改用户</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_products" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>产品属性</td>
        				<td>是否专供</td>
        				<td>代码</td>
        				<td>产品编号</td>
        				<td>SKU</td>
        				<td>修改时间</td>
        				<td>修改用户</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_taskcost" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>时间</td>
        				<td>店铺ID</td>
        				<td>店铺名称</td>
        				<td>销售任务合计</td>
        				<td>任务成本合计</td>
        				<td>修改时间</td>
        				<td>修改用户</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_sales" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>时间</td>
        				<td>店铺ID</td>
        				<td>店铺名称</td>
        				<td>产品编号</td>
        				<td>SKU</td>
        				<td>成本价</td>
        				<td>销售金额</td>
        				<td>件数</td>
        				<td>修改时间</td>
        				<td>修改用户</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_expressfees" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>仓库代码</td>
        				<td>仓库名称</td>
        				<td>快递代码</td>
        				<td>快递公司</td>
        				<td>收寄日期</td>
        				<td>快递单号</td>
        				<td>到达省份</td>
        				<td>市（地级市）</td>
        				<td>县级市（区）</td>
        				<td>乡镇（村）</td>
        				<td>重量</td>
        				<td>邮费</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_reasons" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<thead>
        			<tr>
        				<td colspan='2' style="text-align: center;">
        				<label style="color: red;">注意：E店宝退货原因参数必须与E店宝中退货原因字样完全一致</label>
        				</td>
        			</tr>
        		</thead>
        		<tbody>
        			<tr>
        				<td>退货原因</td>
        				<td>E店宝退货原因参数</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_warehouse" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>仓库编码</td>
        				<td>仓库名称</td>
        				<td>修改时间</td>
        				<td>修改用户</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_express" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>快递代码</td>
        				<td>快递公司</td>
        				<td>属性代码</td>
        				<td>属性</td>
        				<td>修改时间</td>
        				<td>修改用户</td>
        			</tr>
        		</tbody>
        	</table>
        	<table id="t_shop_properties" style="width: 100%; cellspacing: 0; cellpadding: 0; border: 0;">
        		<tbody>
        			<tr>
        				<td>店铺属性ID</td>
        				<td>店铺属性</td>
        				<td>修改时间</td>
        				<td>修改用户</td>
        			</tr>
        		</tbody>
        	</table>
        </div>
    </div>
    </div>
    </div>
    </table>
    <br />
    <div class="wrapdown">
        <div class="footer">
            <script type="text/javascript" src="../common/layout/footer.js"></script>
        </div>
    </div>
    <script type="text/javascript" src="../script/search.js"></script>
    <script type="text/javascript">
    	$(function() {
    		query.init('<%=basePath%>');
    	});
    </script>
  </body>
</html>
